create or replace
TRIGGER UPGRADE_AVAILABILITY_TRIGGER
BEFORE INSERT ON UPGRADE_AVAILABILITY
FOR EACH ROW WHEN (NEW.UPGRADE_AVAILABILITY_ID IS NULL)
BEGIN 
	SELECT UPGRADES_AVAILABILITY_SEQ.NEXTVAL 
	INTO :NEW.UPGRADE_AVAILABILITY_ID 
	FROM DUAL;
END;